package com.hbpa.util;

import java.sql.*;
import java.io.*;
import java.util.Properties;

import javax.sql.DataSource;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ConnectionFactory
{
    private static Properties config = new Properties();
    private static DataSource dataSource;
     
    public DataSource getDataSource() {
		return dataSource;
	} 

	public void setDataSource(DataSource dataSource) {
		this.dataSource = dataSource;
	}


	public static Connection getConnection() throws SQLException
    { 
    	return dataSource.getConnection(); 
    }
}